<?php
	//
	function in_array_r($needle, $haystack) {
		foreach ($haystack as $v) {
			if (is_array($v)) {
				if (in_array_r($needle, $v) === true) return true;
			}else if ($needle === $v){
				return true;
			}
		}
		return false;
	}
	//
?>